package com.ybkj.chat.module.mine.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpFragment;
import com.ybkj.chat.ui.adapter.CashAdapter;
import com.ybkj.chat.ui.view.recyclerview.DividerItemDecoration;
import com.ybkj.chat.ui.view.recyclerview.XRecyclerView;
import com.ybkj.chat.utils.ResourcesUtil;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * @author yyj
 * @create 2019-02-15 16:07
 * @Describe 现金
 */
public class CashFragment extends BaseMvpFragment {
    @BindView(R.id.rv_cash)
    XRecyclerView rvCash;
    Unbinder unbinder;

    private CashAdapter cashAdapter;
    @Override
    protected void injectPresenter() {

    }

    @Override
    protected void initView() {
        rvCash.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL_LIST, 1,
                ResourcesUtil.getColor(R.color.activity_background)));
        cashAdapter = new CashAdapter(mContext);
        cashAdapter.addData("1");
        cashAdapter.addData("1");
        cashAdapter.addData("1");
        rvCash.setAdapter(cashAdapter);
    }

    @Override
    protected void initData() {

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_cash;
    }

    @Override
    protected String getSimpleNme() {
        return null;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        unbinder = ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
